import http from '/@/utils/request'


/**
 * 新增商品信息
 */
export const addProduct = (data) => {
    return http.request({
        url: '/product/add',
        method: 'put',
        data
    })
}

/**
 * 查询商品信息列表
 */
export const listProduct = (query) => {
    return http.request({
        url: '/product/list',
        method:'get',
        params:query
    })
}


export const getProductInfo = (id) => {
    return http.request({
        url: '/product/info?id='+id,
        method:'get',
    })
}

/**
 * 修改商品信息
 */
export const updateProduct = (data) => {
    return http.request({
        url: '/product/update',
        method: 'put',
        data
    })
}

/**
 * 删除商品信息
 */
export const delProduct = (data) => {
    return http.request({
        url: '/product/delete',
        method: 'put',
        data
    })
}
